package sessionManager;

import java.io.IOException;
import java.util.Collection;

import exceptions.database.InvalidUserListException;
import exceptions.database.NonAssessableDatabaseException;
import user.UserIF;

public interface SessionManagerIF {

	public void loadData() throws NonAssessableDatabaseException;

	public Collection<UserIF> getUsers();
	
	public boolean isUserLogged(String login) throws Exception;

	public boolean validateSessionID(String sessionID);

	public UserIF getUser(String sessionID) throws Exception;

	public boolean removeUser(String sessionID) throws Exception;

	public boolean logoffUser(String sessionID) throws Exception;

	public String loginUser(String login, String password)
			throws Exception;
	
	public void saveData() throws InvalidUserListException, IOException;
	
	public UserIF getUserByLogin(String login) throws Exception;
	
	public void createUser(String login, String senha, String nome_exibicao,
			String email, String sexo, String dataNasc, String endereco,
			String interesses, String quem_sou_eu, String filmes,
			String musicas, String livros) throws Exception;
	
	public void cleanPersistence();
	
	public void checkIfEmailExists(String email) throws Exception;
	
	public void checkIfLoginExists(String login) throws Exception;

}